# __author: iamironman
import xadmin
from xadmin import views
from .models import BannerInfo, NavInfo


class BaseSetting(object):
    enable_themes = True
    use_bootswatch = True


xadmin.site.register(views.BaseAdminView, BaseSetting)


class GlobalSettings(object):
    site_title = '路飞学城'
    site_footer = '路飞学城有限公司'
    menu_style = 'accordion'


xadmin.site.register(views.CommAdminView, GlobalSettings)


class BannerInfoModelAdmin(object):
    list_display = ['name', 'orders', 'is_show']


xadmin.site.register(BannerInfo, BannerInfoModelAdmin)


class NavInfoModelAdmin(object):
    list_display = ['name', 'link', 'is_show']


xadmin.site.register(NavInfo, NavInfoModelAdmin)
